

{% block content %}

<p>You can rate for the fluctuation recommendation here</p>


{{s.stock_name}}
Recommendation {{fluctrec.id}}

{% if user.is_authenticated %}

         <table >

      <tr><th>Rated User</th><th>Rating</th></tr>
                               
                                {% for fluct_rat in fluct_rat %}
                                <tr>
                                <td>{{fluct_rat.user}}</td>
                                <td>{{fluct_rat.rating}}</td>
                                </tr>
                                {% endfor %}
           </table>
           
           <table>
                  <tr>
                  <td>There are {{count}} user rated the recommendation</td>
                  </tr>
                  <tr>
                  <td>Total Rating is {{sum}}</td>
                  </tr>
                  <tr>
                  <td>Average Rating is {{avg_rat}}</td>
                  </tr>
                  
          <table>


                 {% if has_rated %}
                        User {{ has_rated.user }}      already voted: {{ has_rated.rating }}
                 
                 {% else %}
                        <form action="" method="POST">
                                {{ form }}
                               
                             <input type="submit" name="submit" value="Rate" />
                        </form>
                 {% endif %}
          {% endif %}





{%endblock%}